from django.contrib import admin
from buddha.models import BuddhaWords, BuddhaNav, SystemConfig, LastSearch, FriendLink


class BuddhaWordsAdmin(admin.ModelAdmin):
    list_display = ('name', 'description', 'analysis', 'photo')

    class Meta:
        label = '心理学词条'

    pass


class BuddhaNavsAdmin(admin.ModelAdmin):
    list_display = ('name', 'link')

    class Meta:
        label = '导航栏管理'

    pass


class SystemConfigAdmin(admin.ModelAdmin):
    list_display = ('name', 'logo')

    class Meta:
        label = '系统配置'

    pass


class LastSearchAdmin(admin.ModelAdmin):
    list_display = ('name', 'sequence')

    class Meta:
        label = '最近搜索关键字'


class FriendLinkAdmin(admin.ModelAdmin):
    list_display = ('name', 'sequence', 'link')

    class Meta:
        label = '友情链接'


admin.site.register(BuddhaWords, BuddhaWordsAdmin)
admin.site.register(BuddhaNav, BuddhaNavsAdmin)
admin.site.register(SystemConfig, SystemConfigAdmin)
admin.site.register(LastSearch, LastSearchAdmin)
admin.site.register(FriendLink, FriendLinkAdmin)
